package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaServiceSettlementQueryRequest struct {
	/*
	   账单查询开始时间。格式示例 2019-03-26 17:15:28     */
	GmtCreateStart *util.LocalTime `json:"gmt_create_start,omitempty" required:"false" `
	/*
	   账单查询结束时间，时间区间限制未15分钟。 格式示例 2019-03-26 17:15:28     */
	GmtCreateEnd *util.LocalTime `json:"gmt_create_end,omitempty" required:"false" `
	/*
	   当前页面，开始值为1     */
	CurrentPage *int64 `json:"current_page,omitempty" required:"false" `
	/*
	   页面展示条数大小     */
	PageSize *int64 `json:"page_size,omitempty" required:"false" `
	/*
	   工单ID     */
	WorkcardId *int64 `json:"workcard_id,omitempty" required:"false" `
	/*
	   交易主订单号码     */
	ParentTradeOrderId *int64 `json:"parent_trade_order_id,omitempty" required:"false" `
	/*
	   服务单号     */
	ServiceOrderId *int64 `json:"service_order_id,omitempty" required:"false" `
	/*
	   交易实物订单号     */
	MasterTradeOrderId *int64 `json:"master_trade_order_id,omitempty" required:"false" `
	/*
	   交易服务订单号     */
	ServiceTradeOrderId *int64 `json:"service_trade_order_id,omitempty" required:"false" `
	/*
	   账单修改开始时间。     */
	GmtModifiedEnd *util.LocalTime `json:"gmt_modified_end,omitempty" required:"false" `
	/*
	   账单修改结束时间，时间区间限制未15分钟。     */
	GmtModifiedStart *util.LocalTime `json:"gmt_modified_start,omitempty" required:"false" `
}

func (s *AlibabaServiceSettlementQueryRequest) SetGmtCreateStart(v util.LocalTime) *AlibabaServiceSettlementQueryRequest {
	s.GmtCreateStart = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetGmtCreateEnd(v util.LocalTime) *AlibabaServiceSettlementQueryRequest {
	s.GmtCreateEnd = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetCurrentPage(v int64) *AlibabaServiceSettlementQueryRequest {
	s.CurrentPage = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetPageSize(v int64) *AlibabaServiceSettlementQueryRequest {
	s.PageSize = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetWorkcardId(v int64) *AlibabaServiceSettlementQueryRequest {
	s.WorkcardId = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetParentTradeOrderId(v int64) *AlibabaServiceSettlementQueryRequest {
	s.ParentTradeOrderId = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetServiceOrderId(v int64) *AlibabaServiceSettlementQueryRequest {
	s.ServiceOrderId = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetMasterTradeOrderId(v int64) *AlibabaServiceSettlementQueryRequest {
	s.MasterTradeOrderId = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetServiceTradeOrderId(v int64) *AlibabaServiceSettlementQueryRequest {
	s.ServiceTradeOrderId = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetGmtModifiedEnd(v util.LocalTime) *AlibabaServiceSettlementQueryRequest {
	s.GmtModifiedEnd = &v
	return s
}
func (s *AlibabaServiceSettlementQueryRequest) SetGmtModifiedStart(v util.LocalTime) *AlibabaServiceSettlementQueryRequest {
	s.GmtModifiedStart = &v
	return s
}

func (req *AlibabaServiceSettlementQueryRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.GmtCreateStart != nil {
		paramMap["gmt_create_start"] = *req.GmtCreateStart
	}
	if req.GmtCreateEnd != nil {
		paramMap["gmt_create_end"] = *req.GmtCreateEnd
	}
	if req.CurrentPage != nil {
		paramMap["current_page"] = *req.CurrentPage
	}
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.ParentTradeOrderId != nil {
		paramMap["parent_trade_order_id"] = *req.ParentTradeOrderId
	}
	if req.ServiceOrderId != nil {
		paramMap["service_order_id"] = *req.ServiceOrderId
	}
	if req.MasterTradeOrderId != nil {
		paramMap["master_trade_order_id"] = *req.MasterTradeOrderId
	}
	if req.ServiceTradeOrderId != nil {
		paramMap["service_trade_order_id"] = *req.ServiceTradeOrderId
	}
	if req.GmtModifiedEnd != nil {
		paramMap["gmt_modified_end"] = *req.GmtModifiedEnd
	}
	if req.GmtModifiedStart != nil {
		paramMap["gmt_modified_start"] = *req.GmtModifiedStart
	}
	return paramMap
}

func (req *AlibabaServiceSettlementQueryRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
